<?php

namespace App\Http\Service;

class QRcodeService
{
    public static function QrCode($uid)
    {

        $size = "";
        $info = "";
        $size = $size ?: 400;
        $info = $info ?: "http://www.yuanmou.work/api/order/" . $uid;
        $res = \QrCode::size($size)->color(0, 0, 0)->generate($info);
        if(!$res){
            throw new \Exception('生成错误');
        }
        return $res;
    }
}
